﻿#ifndef _OI_PLSCANNER_PRESETWIDGET_HPP_
#define _OI_PLSCANNER_PRESETWIDGET_HPP_

#include "Appl/OiAppl.hpp"

namespace Oi
{
    namespace PLScannerCore
    {

        class OI_PLSCANNER_CORE_API PresetWidget : public QWidget
        {
            Q_OBJECT

        public:
            PresetWidget(QWidget * parent = nullptr);

            void setParams(const QString name, const PresetParams params);

            PresetParams parmas();

            QString name() const;

            void setEditable(bool);

        protected:

            bool eventFilter(QObject *obj, QEvent *evt);

        public slots:

            void onEditFinished();

            void onAddTool();

            void onClearView();


        private:
            OI_DECLARE_IMPL(PresetWidget);
            OI_DISABLE_COPY(PresetWidget);
        };
    }
}


#endif
